#pragma once
#include "FxThread.h"

static void* g_ptr_main_instance_singleton = NULL;

class CMainInstance : public CFxThread
{
public:
		static CMainInstance* GetInstance()
	{
		if(g_ptr_main_instance_singleton == NULL)
		{
			g_ptr_main_instance_singleton = new CMainInstance();
		}
		return (CMainInstance*)g_ptr_main_instance_singleton;
	}

	static void DeleteInstance()
	{
		if(g_ptr_main_instance_singleton != NULL)
			delete (CMainInstance*)g_ptr_main_instance_singleton;

		g_ptr_main_instance_singleton = NULL;
	}


public:
	CMainInstance(void);
	~CMainInstance(void);

public:
	// Main thread
	virtual void Run(void* This);

};